# Generate the Doxygen configuration file using CMake environment variables
configure_file(doxygen.conf.in doxygen.conf)

# Add the doc target
add_custom_target(doc
  doxygen doxygen.conf
  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  COMMENT "Generating doxygen HTML files"
  SOURCES ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf
)

file(GLOB_RECURSE DOC_FILES . "${CMAKE_CURRENT_BINARY_DIR}/html/*")
install(FILES ${DOC_FILES} DESTINATION ${SHARED_INSTALL_DIR}/doc)
